<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <s:head/>
  <head>
  	<style type="text/css">
  		.myfeesTable{
  			
  		}
  		.myfeesTable td{
  			text-align: left;
		    border-bottom: 1px solid #C0C2C1;
		    border-right: 1px solid #C0C2C1;
		    padding-left: 4px;
		    height:24px;
		    line-height:24px;
  		}
  	</style>
  </head>
  <body>
  	<form id="fileAddForm" name="fileAddForm" method="post" enctype ="multipart/form-data">
  		<s:if test="#request.isEdit != 1">
	  		<div style="margin: 2px;font-size: 14px">1.选择文档新增方式</div>
		  	<div style="margin: 0;border: 1px solid #C0C2C1;padding: 2px" class="circle_border">
		  		<div>
			  		<input type="radio" id="fileAddType" name="fileAddType" value="0" onclick="changeFileAddType(this)" checked="checked" style="padding-top: 2px"/>由文档模板生成文件
		  		</div>
		  		<div id="div_file_addtype_1" style="padding-left: 28px">
		  			<s:if test="#request.docTemplates == null || #request.docTemplates.size == 0">
		  				没有可用的文档模板，请先添加文档模板！
		  			</s:if>
		  			<s:else>
			  			<table style="width: 60%;margin-left: 20px">
			  				<s:iterator value="%{#request.docTemplates}" status="sta">
			  					<tr>
			  						<td style="text-align: left">
			  							<input style="margin: 0px;padding-top: 2px" type="radio" name="rdo_doctemplates" onclick="setWorkDocName(this)" value="<s:property value="id"/>"/>
			  							<s:property value="name"/>
			  						</td>
			  					</tr>
			  				</s:iterator>
			  				<tr>
		  						<td style="text-align: left">
		  							文档名称：<input type="text" id="workDocName" name="workDocName" style="width: 120px"/>
		  						</td>
		  					</tr>
			  			</table>
		  			</s:else>
		  		</div>
		  	</div>
		  	<div style="margin: 0;border: 1px solid #C0C2C1;padding: 2px;border-top: 0px" class="circle_border">
		  		<div>
			  		<input type="radio" id="fileAddType" name="fileAddType" value="1" onclick="changeFileAddType(this)" style="padding-top: 2px"/>自定义上传文件
		  		</div>
		  		<div id="div_file_addtype_2" style="padding-left: 28px;display: none;">
		  			<p style="margin: 2px 4px 2px 0">上传所需要的时间取决于你上传文件的大小和网速，上传完成后页面自动刷新，请耐心等待</p>
		  			<s:file id="myFile" name="myFile" size="50"/>
		  		</div>
		  	</div>
		  	<div style="margin: 10px 2px 2px 2px;font-size: 14px">2.确定文档共享的访客</div>
  		</s:if>
  		<s:else>
  			<input type="hidden" id="workDocId" name="workDocId" value="<s:property value="#request.workDocId"/>" />
  		</s:else>
	  	<div>
	  		<s:optiontransferselect 
				name="employeeLeft" 
	            leftTitle="全部访客"
	            list="#request.employees1" 
	            listKey="id" 
	            listValue="nickname" 
				multiple="true" 
	            emptyOption="false" 
	            allowUpDownOnLeft="false" 
	            cssStyle="width:200px;height:250px;" 
	            rightTitle="共享的访客" 
	            doubleList="#request.employees2" 
	            doubleListKey="id" 
	            doubleListValue="nickname" 
	            doubleName="employeeRight" 
	            doubleEmptyOption="false" 
	            doubleMultiple="true" 
	            allowUpDownOnRight="false" 
	            buttonCssStyle="width: 40px;color:black"
	            doubleCssStyle="width:200px;height:250px;" 
			/>
	  	</div>
	    <div style="width: 100%;text-align: right;margin-top: 10px">
	    	<input type="button" class="btn_ok" onclick="saveWorkDoc()" value="确定" />
	    </div>
  	</form>
  </body>
</html>
